home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr53
/
pctv4n_1.zip
/
CHILD.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-06-10
|
1KB
|
43 lines
// child.h -- TChildWindow class declaration
#include <commdlg.h>
#include <owl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strng.h>
#include <array.h>
#include "wlist.rch"
#define BUFSIZE 256 // Filename buffer size
// The MDI child window class (individual "document" windows)
class TChildWindow: public TWindow {
public:
TChildWindow(PTWindowsObject AParent, LPSTR fName);
~TChildWindow()
{ if (hFont != NULL) DeleteObject(hFont); }
virtual void SetupWindow();
int ReadFile();
void AdjustSettings();
void AdjustScroller();
virtual void CMFontSelect(RTMessage Msg)
= [CM_FIRST + CM_FONTSELECT];
virtual void WMSize(RTMessage)
= [WM_FIRST + WM_SIZE];
virtual void WMKeyDown(RTMessage)
= [WM_FIRST + WM_KEYDOWN];
virtual void Paint(HDC PaintDC, PAINTSTRUCT &PaintInfo);
private:
Array text; // Array of string objects
LOGFONT font; // Logical font
HFONT hFont; // Font handle
COLORREF fontColor; // Font color
int fontPointSize; // Font size in points
long width, height; // Size of window in display units
int numRows, numCols; // Number of text file rows and cols
int rowSep, colSep; // Units separation between chars
int glyphW, glyphH; // Character glyph width and height
char fileName[BUFSIZE]; // Text filename
};